using System;
using System.Collections.Specialized; 
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Security; 
using HermesPortal.Core;   
using HermesPortal.Core.DAO;
namespace HermesPortal.Core
{
    public class RealmServices
    {
        private RealmServices(){}

       

        /// <summary>
        /// Get all realms for a Saga
        /// </summary>
        /// <param name="sagaID"></param>
        /// <returns>List<Realm></returns>
      
        public static string GetRealmDescription(int realmID)
        {
            return RealmDAO.GetRealmDescription(realmID);   
        }

        public static Realm GetRealm(int realmID)
        {
            return RealmDAO.GetRealm(realmID);
        }


        public static List<Realm> AdminGetRealms(int sagaID, int realmID)
        {
            return RealmDAO.AdminGetRealms(sagaID, realmID);  
        }
        public static List<Realm> AdminGetRealms(int sagaID)
        {
            return RealmDAO.GetRealmsBySaga(sagaID);
        }

        public static List<Realm> GetRealms(int sagaID, int creatorID)
        {
            return RealmDAO.GetRealmsBySaga(sagaID,creatorID);
        }
        public static List<Realm>  GetRealms(int sagaID, int realmID, int creatorID)
        {
            return RealmDAO.GetRealms(sagaID,  realmID,creatorID);
        }

        /// <summary>
        ///  returns the Title and RealmID for SubRealms of the current chosen realm.
        /// </summary>
        /// <param name="sagaID"></param>
        /// <param name="realmID"></param>
        /// <returns>StringDictionary</returns>
        public static StringDictionary GetRealmSubNodesInfo(int sagaID,int realmID, int creatorID)
        {
            return RealmDAO.GetRealmSubNodesInfo(sagaID, realmID, creatorID);  
        }

        /// <summary>
        ///  Returns the Title and RealmID for all Realms in the current Saga.
        /// </summary>
        /// <param name="sagaID"></param>
        /// <param name="realmID"></param>
        /// <returns>StringDictionary</returns>
        public static StringDictionary GetRealmSubNodesInfo(int sagaID, int creatorID)
        {
            return RealmDAO.GetRealmSubNodesInfo(sagaID, creatorID);
        }

        public static void UpdateRealm(Realm realm)
        {
            RealmDAO.UpdateRealm(realm);  
        }


        public static int AddRealm(Realm realm)
        {
            return RealmDAO.AddRealm(realm); 
        }
    }
}
